package com.hqyj.javaSpringBoot.util;

import org.apache.commons.lang3.StringUtils;
import org.springframework.util.DigestUtils;

/**
 * @Description：MD5Util
 * @Author ：Cwd
 * @Date ：2021/8/26 11:04
 */
public class MD5Util {

    public static String getMD5(String password){
        if (StringUtils.isBlank(password)){
            return null;
        }
        String simple = password + "/" + "@@##$$%%&&";
        return DigestUtils.md5DigestAsHex(simple.getBytes());
    }

    public static void main(String[] args) {
        System.out.println(MD5Util.getMD5("123456"));
    }
}
